import { antdList } from '../api/index'

export let antd_List = () => {
    return async dispatch => {
        let { data } = await antdList()
        dispatch({
            type: 'ANTD_LIST',
            payload: data
        })
    }
}

export let click_Index = (index) => {
    return dispatch => {
        dispatch({
            type: 'CLICK_INDEX',
            payload: index
        })
    }
}

export let detele_Item = (index) => {
    return dispatch => {
        dispatch({
            type: 'DETELE_ITEM',
            payload: index
        })
    }
}

export let save_Btn = (obj) => {
    return dispatch => {
        dispatch({
            type: 'SAVE_BTN',
            payload: obj
        })
    }
}

export let Inquire = (cha) => {
    return dispatch => {
        dispatch({
            type: 'INQUIRE',
            payload: cha
        })
    }
}

// export let Inquires = () => {
//     return dispatch => {
//         dispatch({
//             type: 'INQUIRES',
//         })
//     }
// }

export let all_Flag = () => {
    return dispatch => {
        dispatch({
            type: 'ALL_FLAG'
        })
    }
}

export let click_Flag = (index) => {
    return dispatch => {
        dispatch({
            type: 'CLICK_FLAG',
            payload: index
        })
    }
}